from django.db import models


# Create your models here.
class bks(models.Model):
    USER_TYPE = ((0, "本科生"), (1, "研究生"), (2, "教职工"))
    ISFIVER_TYPE = ((True, "是"), (False, "否"))
    Tran_TYPE = (("0", "飞机+火车"), ("1", '飞机+长途汽车'), ("2", '火车+长途汽车'), ("3", '火车'), ("4", '长途汽车'), ("5", '自驾'))
    ISSEN_TYPE = (("0", "未就诊"), ("1", '已就诊,诊疗结果为其他疾病'), ("2", '已就诊,诊疗结果为新型冠状病毒肺炎'))
    ISISISOLATED_TYPE = (("0", '是,在专业的医疗机构隔离'), ("1", '是,留家隔离'), ("2", '未隔离'))
    ISPASSED_TYPE = (("0", "未到过疫区"), ("1", "到过武汉"), ("2", "到过湖北"), ("3", "路过湖北"))
    userid = models.CharField(max_length=12, verbose_name="学工号")
    isinschool = models.BooleanField(choices=ISFIVER_TYPE,blank=True, null=True)
    usertype = models.IntegerField(choices=USER_TYPE, default=0)
    location = models.TextField(verbose_name="当前位置", blank=True, null=True)
    isfever = models.BooleanField(blank=True, null=True, choices=ISFIVER_TYPE)
    is_go_to_outer = models.BooleanField(blank=True, null=True, choices=ISFIVER_TYPE)
    isplanedtravel = models.BooleanField(blank=True, null=True, choices=ISFIVER_TYPE)
    ispassed = models.CharField(max_length=1, blank=True, null=True, choices=ISPASSED_TYPE)
    trans_type = models.CharField(max_length=1, blank=True, null=True, choices=Tran_TYPE)
    isseen = models.CharField(max_length=1, blank=True, null=True, choices=ISSEN_TYPE)
    isisolated = models.CharField(max_length=1, blank=True, null=True, choices=ISISISOLATED_TYPE)
    hospital = models.TextField(blank=True, null=True)
    is_atach_patient = models.BooleanField(blank=True, null=True, choices=ISFIVER_TYPE)
    folk_attach = models.BooleanField(blank=True, null=True, choices=ISFIVER_TYPE)
    planedtravel_time = models.DateTimeField(blank=True, null=True)
    plan_back_time = models.DateTimeField(blank=True, null=True)
    planedleave_time = models.DateTimeField(blank=True, null=True)
    createdate = models.DateTimeField(auto_now=True)
    depid = models.CharField(max_length=20, default=None, null=True)
